From 060cc4dbc77621d4f247bff1b4509a4f54a6feda Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 28 Jul 2009 16:47:37 +0100 Subject: [PATCH] ns16550: More robust check for presence of FIFO Signed-off-by: Christoph Egger --- xen/drivers/char/ns16550.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 1f88907008..7de7fcd386 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -214,7 +214,8 @@ static void __devinit ns16550_init_preirq(struct serial_port *port) ns_write_reg(uart, FCR, FCR_ENABLE | FCR_CLRX | FCR_CLTX | FCR_TRG14); /* Check this really is a 16550+. Otherwise we have no FIFOs. */ - if ( (ns_read_reg(uart, IIR) & 0xc0) == 0xc0 ) + if ( ((ns_read_reg(uart, IIR) & 0xc0) == 0xc0) && + ((ns_read_reg(uart, FCR) & FCR_TRG14) == FCR_TRG14) ) port->tx_fifo_size = 16; } -- 2.30.2